package com.su.song.myactiviy;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;

public class MainStart extends AppCompatActivity {

    private static final String Tag = "SP";


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_start);
        Button turn = findViewById(R.id.btn_tz);
        turn.setOnClickListener(v -> {
         startActivity(new Intent(this,MainFinsh.class));
        });
        Log.d(Tag, "onCreat: MainStart");
    }
//生命周期函数实验
    @Override
    protected void onStart() {
        super.onStart();
        Log.d(Tag, "onStart: MainStart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.d(Tag, "onResume: MainStart");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.d(Tag, "onPause:MainStart ");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.d(Tag, "onStop: MainStart");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d(Tag, "onDestroy:MainStart ");
    }
}